package com.example.java8;
import java.util.Enumeration;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;

public class JarInfoReader {
    public static void main(String[] args) {
        String jarFilePath = "/Users/xiaohongfei/code/seczone-sca-engine/scaappcheckprovider/target/sc-engine-3.0.4.1.jar";
        try {
            JarFile jarFile = new JarFile(jarFilePath);
            Enumeration<JarEntry> entries = jarFile.entries();
            while (entries.hasMoreElements()) {
                JarEntry entry = entries.nextElement();
                if (!entry.isDirectory()) {
                    System.out.println(entry.getName());
                }
            }
            jarFile.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
